package com.swfee.qinben;

import android.content.Context;
import android.os.Bundle;
import android.text.Html;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;

import com.swfee.qinben.base.DoPickMultimediaBaseActivity;
import com.swfee.qinben.dto.active.ScheduleModel;
import com.swfee.qinben.dto.rsp.HealthMeasureRspDto;
import com.swfee.qinben.util.CurenActivitUtils;

public class ScheduleOperSubmitActivity extends DoPickMultimediaBaseActivity {


	private LayoutInflater inflater;

	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
		setContentView(R.layout.schedule_opt_submit);
		
		HealthMeasureRspDto heqRspDto =  new HealthMeasureRspDto();
		 String measureData = getIntent().getStringExtra("measureData");
		 String solution =  getIntent().getStringExtra("solution");
		 int healthResult =  getIntent().getIntExtra("healthResult",1);
		 
		 heqRspDto.setMeasureData(measureData);
		 heqRspDto.setHealthResult(healthResult);
		 heqRspDto.setSolution(solution);
		
		TextView tvTestContent =  (TextView) findViewById(R.id.test_content);
		tvTestContent.setText(Html.fromHtml(heqRspDto.getMeasureDataHTML()));
		
		Button submitComment = (Button) findViewById(R.id.btn_submit_comment);
		submitComment.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				CurenActivitUtils.startActivity(ScheduleResultCommentActivity.class, false,getIntent().getExtras());
			}
		});

		ImageView uploadFile = (ImageView) findViewById(R.id.upload_file);

		uploadFile.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				doPickDoAction();
			}
		});

	}

}